package com.demo.gulimall.ware.entity;

import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 采购信息
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("wms_purchase")
public class Purchase implements Serializable {
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`assignee_id`")
	private Long assigneeId;

	@TableField(value = "`assignee_name`")
	private String assigneeName;

	@TableField(value = "`phone`")
	private String phone;

	@TableField(value = "`priority`")
	private Integer priority;

	@TableField(value = "`status`")
	private Integer status;

	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`ware_id`")
	private Long wareId;

	@TableField(value = "`amount`")
	private BigDecimal amount;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`update_time`")
	private Date updateTime;

}
